<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js排序算法</title>
</head>

<body>
    <button onclick="randomArr()">随机生成15个数的数组</button>
    <button onclick="bubbleSort()">使用冒泡排序</button>

    <button onclick="selectionSort()">使用选择排序</button>

    <button onclick="InsertionSort()">使用插入排序</button>

    <button onclick="QuickSort()">快速排序法</button>
    <p id="showArray"></p>
    <p id="showSortProcess"></p>
    <script>
        var arr = new Array(15);

        function randomArr() {
            for (let i = 0; i < 15; i++) {
                arr[i] = Math.random()
            }
        }
        console.log("数组内容：", arr)

        function bubbleSort() {
            // 冒泡排序
        }

        function selectionSort() {
            // 选择排序

        }

        function InsertionSort() {

        }

        function QuickSort() {
            // 快速排序
        }
    </script>
</body>

</html>